package com.itheima.hmshopping.dubbo.apiImpl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.hmshopping.dubbo.api.UmsMenuServiceApi;
import com.itheima.hmshopping.dubbo.mapper.UmsAdminMapper;
import com.itheima.hmshopping.dubbo.mapper.UmsMenuMapper;
import com.itheima.hmshopping.entity.UmsMenu;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class UmsMenuServiceImpl implements UmsMenuServiceApi {
    @Autowired
    private UmsMenuMapper umsMenuMapper;


    /**
     * 查询所有菜单信息
     *
     * @return
     */
    @Override
    public List<UmsMenu> alls() {
        LambdaQueryWrapper<UmsMenu> wrapper=new LambdaQueryWrapper<>();
        wrapper.orderByAsc(UmsMenu::getId);
        return umsMenuMapper.selectList(wrapper);
    }
}
